﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Order.API.Services.Commands;

namespace Order.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class OrdersController : ControllerBase
    {
        // GET api/values
        [HttpPost]
        public async Task<ActionResult> Create(int id,int userId)
        {
            await Startup.SendEndpoint.Send(new CreateOrderCmd() { Id = Guid.NewGuid().GetHashCode(), UserId = Guid.NewGuid().GetHashCode() });
            return Ok();
        }
    }
}
